# OpenAPI version identifier - required for OpenAPI 3.0 domains
openapi: 3.0.0

#######################
# Optional info section
#######################
info:
  title: DIP Interface & Report Example payloads
  description: Common example messages for DIP APIs. Examples have not been reviewed hence reader should defer to the actual swagger and report back any inconsistencies. At present these are generated on a 'best endeavours' approach.
  version: '0.3'

components:
  examples:
    IF-001:
      value:
        - payload: 
            CommonBlock: 
                S0: 
                    interfaceID: 'IF-001'
                    schemaVersion: "006"
                    eventCode: "[InitialRegistration]"
                S1:
                    environmentTag: "DEV"
                    subText: "Dummy incoming message for IF-001 Initial Registration"
                    senderUniqueReference: "S-IF-001-0123456789-SUP-20222313-12345687a1234567a"
                    senderTimestamp: "2022-03-21T19:05:00+00:00"
                    senderDIPID: "2209012349"
                    senderRoleID: "REGS"
                    senderCorrelationID: "CI-20220401-1234567890123abce123092"
                    DIPConnectionProviderID: null
                A0:
                    primaryRecipients:  
                      - "2300000900"
                    secondaryRecipients: []
                    always: []
                M0:
                    MPANCore: "2000056535971"
                    distributorDIPID: "1009012345"
                    GSPGroupID: "_K"
            CustomBlock:
                B013: 
                  CSSRegistrationRequestID: "XTRE"
                B002: 
                  incomingSupplierDIPID: "2209012345"
                  incomingSupplierMPID: "EMEB"
                  incomingSupplierEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B004: 
                  domesticPremiseIndicator: true
                  domesticPremiseIndicatorEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B006: 
                  customerDirectContractMeteringService: true
                  customerDirectContractMeteringServiceDIPID: "1209012345"
                  customerDirectContractDataService: true
                  customerDirectContractDataServiceDIPID: "1409012345"
                B022: 
                  meteringPointPostcode: "SW1A 2AA"
                  addressLine1: "10 Downing Street"
                  addressLine2: "Westminster"
                  addressLine3: "London"
                  addressLine4: ""
                  addressLine5: ""
                  addressLine6: ""
                  addressLine7: ""
                  addressLine8: ""
                  addressLine9: ""
                B023: 
                  connectionTypeIndicator: "W"
                  connectionTypeEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  energyDirection: "I"
                  meteredIndicator: true
                B024: 
                  DUOSTariffID: "999"
                  DUOSTariffIDEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B025: 
                  energisationStatus: "D"
                  energisationStatusEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B026: 
                  marketSegmentIndicator: "S"
                  marketSegmentIndicatorEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B027: 
                  annualConsumption: "123456789.123"
                  annualConsumptionEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  annualConsumptionQualityIndicator: "A"
                B029: 
                  DCCServiceFlag: "A"
                  DCCEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B030: 
                  IHDInstallStatus: "D"
                  IHDEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B031: 
                  SMSOID: "TRIL"
                  SMSOEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B032: 
                  profileClass: "02"
                  profileClassEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  SSC: "83"
                  SSCEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B035List:  # list
                    linkedImportExportMPAN: "2000056535971"
                    linkedMPANEnergyDirection: "I"
                    importExportMPANSupplierDIPID: "2309012345"
                    importExportMPANSupplierMPID: "EMEB"
                B037List: # list
                    primaryMPAN: "2000056535971"
                    secondaryMPAN: "2000056535971"
        - payload: 
            CommonBlock: 
                  S0: 
                    InterfaceID: 'IF-001'
                    schemaVersion: "006"
                    eventCode: "[ChangeOfSupplier]"
                  S1:
                    environmentTag: "DEV"
                    subText: "Dummy message for IF-001 Initial Registration"
                    senderUniqueReference: "S-IF-001-0123456789-SUP-20222313-12345687a1234567a"
                    senderTimestamp: "2022-03-21T19:05:00+00:00"
                    senderDIPID: "1009012345"
                    senderRoleID: "SUP"
                    senderCorrelationID: "CI-20220401-1234567890123abce123092"
                    DIPConnectionProviderID: null
                  A0:
                      primaryRecipients:  
                        - "2300000900"
                      secondaryRecipients: []
                      always: []
                  M0:
                    MPANCore: "2000056535971"
                    distributorDIPID: "1009012345"
                    GSPGroupID: "_K"
            CustomBlock:
                  B013: 
                    CSSRegistrationRequestID: "XTRE"
                  B002: 
                    incomingSupplierDIPID: "1009012345"
                    incomingSupplierMPID: "EMEB"
                    incomingSupplierEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  B003: 
                    outgoingSupplierDIPID: "1009012345"
                    outgoingSupplierMPID: "EMEB"
                    outgoingSupplierEffectiveToDate: "2022-03-21T19:05:00+00:00"
                  B004: 
                    domesticPremiseIndicator: true
                    domesticPremiseIndicatorEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  B005: 
                    currentMeteringServiceDIPID: "1009012345"
                    currentMeteringServiceMPID: "EMEB"
                    currentDataServiceDIPID: "1009012345"
                    currentDataServiceMPID: "EMEB"
                  B006: 
                    customerDirectContractMeteringService: true
                    customerDirectContractMeteringServiceDIPID: "1009012345"
                    customerDirectContractDataService: true
                    customerDirectContractDataServiceDIPID: "1009012345"
                  B022: 
                    meteringPointPostcode: "SW1A 2AA"
                    addressLine1: "10 Downing Street"
                    addressLine2: "Westminster"
                    addressLine3: "London"
                    addressLine4: ""
                    addressLine5: ""
                    addressLine6: ""
                    addressLine7: ""
                    addressLine8: ""
                    addressLine9: ""
                  B023: 
                    connectionTypeIndicator: "W"
                    connectionTypeEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                    energyDirection: "I"
                    meteredIndicator: true
                  B024: 
                    DUOSTariffID: "999"
                    DUOSTariffIDEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  B025: 
                    energisationStatus: "D"
                    energisationStatusEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  B026: 
                    marketSegmentIndicator: "S"
                    marketSegmentIndicatorEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  B027: 
                    annualConsumption: "123456789.123"
                    annualConsumptionEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                    annualConsumptionQualityIndicator: "A"
                  B029: 
                    DCCServiceFlag: "A"
                    DCCEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  B030: 
                    IHDInstallStatus: "D"
                    IHDEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  B031: 
                    SMSOID: "TRIL"
                    SMSOEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  B032: 
                    profileClass: "02"
                    profileClassEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                    SSC: "83"
                    SSCEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  B035List:  # list
                      - linkedImportExportMPAN: "2000056535971"
                        linkedMPANEnergyDirection: "I"
                        importExportMPANSupplierDIPID: "1009012345"
                        importExportMPANSupplierMPID: "EMEB"
                      - linkedImportExportMPAN: "2000056535972"
                        linkedMPANEnergyDirection: "I"
                        importExportMPANSupplierDIPID: "1009012345"
                        importExportMPANSupplierMPID: "EMEB"
                  B037List:
                      - primaryMPAN: "2000056535971"
                        secondaryMPAN: "2000056535977"
                      - primaryMPAN: "2000056535971"
                        secondaryMPAN: "2000056535976"

    IF-002:
      value:
          - payload: 
              CommonBlock: 
                S0: 
                  InterfaceID: 'IF-002'
                  schemaVersion: "006"
                  eventCode: "[GainMPANInfo]"
                S1:
                  environmentTag: "DEV"
                  subText: "additonal text to separate messages in testing - ignore in production"
                  senderUniqueReference: "S-IF-002-0123456789-REGS-20222313-12345687a1234567a"
                  senderTimestamp: "2022-03-21T19:05:00+00:00"
                  senderDIPID: "1009012345"
                  senderRoleID: "REGS"
                  senderCorrelationID: "CI-20220401-1234567890123abce123092"
                  DIPConnectionProviderID: "1009012345"
                A0:
                  primaryRecipients:  
                      - "2300000900"
                  secondaryRecipients: []
                  always: []
                M0:
                  MPANCore: "2000056535971"
                  distributorDIPID: "1009012345"
                  GSPGroupID: "_K"
              CustomBlock:
                B013:
                  CSSRegistrationRequestID: 'DXVRE132'
                B005: 
                  currentMeteringServiceDIPID: "1009012345"
                  currentMeteringServiceMPID: "EMEB"
                  currentDataServiceDIPID: "1009012345"
                  currentDataServiceMPID: "EMEB"
                B006: 
                  customerDirectContractMeteringService: true
                  customerDirectContractMeteringServiceDIPID: "1009012345"
                  customerDirectContractDataService: true
                  customerDirectContractDataServiceDIPID: "1009012345"
                B022: 
                  meteringPointPostcode: "SW1A 2AA"
                  addressLine1: "10 Downing Street"
                  addressLine2: "Westminster"
                  addressLine3: "London"
                  addressLine4: ""
                  addressLine5: ""
                  addressLine6: ""
                  addressLine7: ""
                  addressLine8: ""
                  addressLine9: ""
                B023: 
                  connectionTypeIndicator: "W"
                  connectionTypeEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  energyDirection: "I"
                  meteredIndicator: true
                B024: 
                  DUOSTariffID: "999"
                  DUOSTariffIDEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B025: 
                  energisationStatus: "D"
                  energisationStatusEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B026: 
                  marketSegmentIndicator: "S"
                  marketSegmentIndicatorEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B027: 
                  annualConsumption: "123456789.123"
                  annualConsumptionEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  annualConsumptionQualityIndicator: "A"
                B029: 
                  DCCServiceFlag: "A"
                  DCCEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B030: 
                  IHDInstallStatus: "D"
                  IHDEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B031: 
                  SMSOID: "TRIL"
                  SMSOEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B032: 
                  profileClass: "02"
                  profileClassEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                  SSC: "83"
                  SSCEffectiveFromDate: "2022-03-21T19:05:00+00:00"
                B035List: 
                    - linkedImportExportMPAN: "2000056535971"
                      linkedMPANEnergyDirection: "I"
                      importExportMPANSupplierDIPID: "1009012345"
                      importExportMPANSupplierMPID: "EMEB"
                    - linkedImportExportMPAN: "2000056535972"
                      linkedMPANEnergyDirection: "I"
                      importExportMPANSupplierDIPID: "1009012346"
                      importExportMPANSupplierMPID: "EMEB"
                B037List: # list
                    - primaryMPAN: "2000056535971"
                      secondaryMPAN: "2000056535991"
    REP-002:
      value:
        - payload:
            CommonBlock: 
                  S0: 
                    InterfaceID: 'REP-002'
                    schemaVersion: "006"
                    eventCode: "[DUoSLDSOAggData]"
                  S1:
                    environmentTag: "DEV"
                    subText: "Sample of a REP-002 report "
                    senderUniqueReference: "S-REP-002-0123456789-ECS-20222313-12345687a1234567a"
                    senderTimestamp: "2022-03-21T19:05:00+00:00"
                    senderDIPID: "1009012345"
                    senderRoleID: "SUP"
                    senderCorrelationID: "CI-20220401-1234567890123abce123092"
                    DIPConnectionProviderID: "1009012345"
                  A0:
                    primaryRecipients:  
                        - "2300000900"
                    secondaryRecipients: []
                    always: []
            CustomBlock:
                  P03:
                    compressedReport: "+R0lX1BjYn7x7XDVaqZuJ+qtJ3Gw1Fj1PyE+H3J5E+MlBuxe3coDc6ovS87Z+itKRa74nqP2BnDvI42r6GZ2KHBo+7La/tWJrv4rhYcdyQ5RAZbh3edmGKd7bVEiERhUb97jWJTkyFRu7/X/Tt8+lLq31Fx0uqQHTt3gu0qD/xcK5eC/ZahKkLrCxWtL+0G6ZTgIMpTY98KxfTbgDPruWkIU6t75lgv2QhAO8KanKO0Sf12mwXxjGULS1gkYizJilvLrteNDMgBmPsI0KIxHNvvU03tocySPn58AKBzV4Q8Fpo+x5Yoo6loI3h9ZLdktG7yHFHg3G8abaSgQp6FW+R0lX1BjYn7x7XDVaqZuJ+qtJ3Gw1Fj1PyE+H3J5E+MlBuxe3coDc6ovS87Z+itKRa74nqP2BnDvI42r6GZ2KHBo+7La/tWJrv4rhYcdyQ5RAZbh3edmGKd7bVEiERhUb97jWJTkyFRu7/X/Tt8+lLq31Fx0uqQHTt3gu0qD/xcK5eC/ZahKkLrCxWtL+0G6ZTgIMpTY98KxfTbgDPruWkIU6t75lgv2QhAO8KanKO0Sf12mwXxjGULS1gkYizJilvLrteNDMgBmPsI0KIxHNvvU03tocySPn58AKBzV4Q8Fpo+x5Yoo6loI3h9ZLdktG7yHFHg3G8abaSgQp6FW+R0lX1BjYn7x7XDVaqZuJ+qtJ3Gw1Fj1PyE+H3J5E+MlBuxe3coDc6ovS87Z+itKRa74nqP2BnDvI42r6GZ2KHBo+7La/tWJrv4rhYcdyQ5RAZbh3edmGKd7bVEiERhUb97jWJTkyFRu7/X/Tt8+lLq31Fx0uqQHTt3gu0qD/xcK5eC/ZahKkLrCxWtL+0G6ZTgIMpTY98KxfTbgDPruWkIU6t75lgv2QhAO8KanKO0Sf12mwXxjGULS1gkYizJilvLrteNDMgBmPsI0KIxHNvvU03tocySPn58AKBzV4Q8Fpo+x5Yoo6loI3h9ZLdktG7yHFHg3G8abaSgQp6FW"